package com.pt.common.utils;

import java.util.HashMap;
import java.util.Map;

/**
 * @author like
 * @date 2025/3/5 17:28
 * @Description TODO
 */
public class AiString {
    public static Map parseEvaluation(String input) {
        // 使用换行符分割字符串
        String[] parts = input.split("\n", 2); // 限制分割为两部分
            String scores = parts[0].trim(); // 获取第一部分并去除两端空格
            String comments = parts[1].trim(); // 获取第二部分并去除两端空格
            scores = scores.replace("Scores: ", "");
            comments = comments.replace("Comments: ", "");
            Map<String, String> map = new HashMap<String,String>();
            map.put("scores",scores);
            map.put("coments",comments);
            return map;

    }
}
